Skip to content

add kwargs to bitbangio spi#821

Merged
tannewt merged 2 commits into
adafruit:masterfrom
deanm1278:master
May 9, 2018
Merged

add kwargs to bitbangio spi#821
tannewt merged 2 commits into
adafruit:masterfrom
deanm1278:master

Conversation

@deanm1278
Copy link
Copy Markdown

re: #472

import bitbangio
import board

spi = bitbangio.SPI(board.D10, board.D6, board.D9)

while not spi.try_lock():
    pass

a = bytearray(6)
spi.write_readinto(bytes([2, 54, 9, 88]), a, in_start=2, in_end=4, out_start=1, out_end=3)

#if mosi and miso are connected this should print 0, 0, 54, 9, 0, 0
for b in a:
    print(b)

@deanm1278 deanm1278 requested a review from tannewt May 9, 2018 19:16
Copy link
Copy Markdown
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants